//
//  DiscoverViewController.m
//  test1
//
//  Created by chen on 16/10/29.
//  Copyright © 2016年 chen. All rights reserved.
//

#import "DiscoverViewController.h"
#import "HDXTypeView.h"
#import "HDXInfoTableView.h"
#import "Masonry.h"
@interface DiscoverViewController ()

@end

@implementation DiscoverViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self setupUI];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - 设置界面
-(void)setupUI
{
    //类型视图
    HDXTypeView *typeV = [[HDXTypeView alloc]init];
    //添加到控制器的View上
    [self.view addSubview:typeV];
    
    //自动布局
    [typeV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.view).mas_offset(64);
        make.left.right.equalTo(self.view);
        make.height.mas_equalTo(37);
    }];
    
    //信息视图
    HDXInfoTableView *infoV = [[HDXInfoTableView alloc]init];
    [self.view addSubview:infoV];
    
    //自动布局
    [infoV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.view);
        make.top.equalTo(typeV.mas_bottom);
        
    }];
}


@end
